refactor watchdog

Change-Id: I19a2cf8aa394bd47b31282648e93afb160d9d14d