Adding a hook on a module at the end of a phase