fix file extension in file renaming