More safety and auto-recovery logic for the Wifi mode