make stream accept kind_of IO as in aws/s3