changed $stdout to StringIO object