fixed a bug where newFilename always returned different name