Enhance operation when power applied without usb cable attached.
Help avoid race condition by not setting done=0 until end of init.
Logging and ThreadID update.
Correctly handle buffer size when firmware_di and external power used.