Refactoring by introducing FileProcessor