Thinko with the StringIO things. Fix it