Bac 91 debug hook

Fixes an issue that I introduced in #488. Hook should not be called, but logging to the file should still happen.