Added test for stdout robustness