refactoring FileMap