Fix if bytesRead != bufSize
Avoid using constructor of StdCapture