refactored FileHandler too