fixing a bug on the file name when saving