added hook system to add file handlers