works fine without bytestream
add read and write