Add FileHandlerTest
Refactor FileHandler