Add check for preHook errors before processing postHooks; closes #80