Refactor file handler configuration