When renaming a file, moving to another directory is not allowed. Added validation
Forgot to uncomment line