fix end option behavior on write stream
Release 0.3.1