Streaming to a file via a callback seems to work.

Next step is to remove file completely and do everything with a buffer.