EndWriteStream: fix instantiation