fixed file rename ordering bug