fix 'global name 'StringIO' is not defined' BUG