Hooks

Similarly here: we should be very prescriptive about what we allow people to return from the hook script and at least warn if there is something unexpected in the output