fixed stdio buffering and eeprom