file update refactoring