Should be done for StringIO objects as well