can we use StringIO instead of tempfile ?