ripped out stringIO in favour of tempfile; smaller buffers on Queue = lower chance of memory overflow