exception handling is added for renaming file