handling of stderr/stdout