added test for stdout capturing