Changed logic: hooks no longer get the payload as argument, now they get the path to a file holding the payload.

Passing the payload as an argument was too error prone.