Changed the way the file gets renamed.