Fix bugs and add more verbose watchdog messages when errors occur