Catch errors in the Watchdog error handler

Fixes #164