[-] io.File.registerHook
refactor middlewares