Improvements to Mega2560 watchdog reset handling