Removed extra StringIO wrapping