Use an API which is closer to and also supports io.ReadWriteCloser