Add ability to debug hook exceptions (#113)