Fixed errors in serial.cpp, improved readBlock