Fix Watchdog issue and add strong race-condition safeguard in LocalStorage and Plug