Rewrite file streaming on top of AsyncIterator and async generator functions.