Fix file renaming issue