fix WriteStream example