Check on watchdog when we're in flashing functions
Switch off repack debug statements unless requested, other minor cleanup
Add a "ready" flag to prevent opening files while WOFS being repacked