Set writeCalled to true when WriteAsync(stream)