I was originally going to switch to print function, but frankly I can't
see any reason to keep these. I don't know what data it's leaking into
the logs, but it certainly doesn't seem useful
StringIO is not in Py3. And it's not used at all, so removing that
import. Seems to work with Py3 now. More testing is required.