Fixed threading bug, added logging, added eeprom support