Added logging and exception handling
Renaming files