logging and renaming