Tried datastream method. Taught me a lot about how to do this
Switched to a much more reasonable/sensible approach
Added basic logging. Going to improve