minor modification for test_OutStream and test_InStream