ensure stream is no longer writable after closing
link windows compat issue
1.0.1