add watchdog timer logic