Fixed errors when no file or directory exists for user
Removed non-functioning code