Improved RenamedFile Handler by adding exception handling