factor the watchdog into its own package