Better handling of write streams