added write downloads to MemoryStream support