Gracefully import (c)StringIO