Fixed hook error reporting.
Merge pull request #26 from alexgrist/master

Fixed hook error reporting.