enable reading from and writing to StringIO