Added some debugging around file creation and renaming