fix bug; read() will block if readSize is zero
add comment
print readSize