saveOutput can distinguish stdout, stderr