Fix file rename failure.

#4555