use MonadIO for toStreamData