file abstraction refactoring