add stderr and stdout support