only writing out if the stream is writable
minor version