fixing: TypeError - no implicit conversion of StringIO into String