Refactor file operations to file interactor