commit f29db93 introduced a bug where in reading numBytes would have returned empty string as read() was called before it.