Fixed possible errors on watchdog feeder and threading