iostream fix for multiprocessing with no performance hit to single process

Better version of #2712