Fix file replacement error.