Fix file rename bug.