it loads scripts from directory and calls the defined hooks, when a handler is called.