Refactoring: file reading construction