Tweaked the watchdog and the integration with the other parts. Added some messages at the debug level for tracing functionality. Fixed a null pointer dereference.