Man critically injured in chainsaw attack