fix random test: explicit conversion iostream to bool