Bug/iotcore 232 capture redirection errors

Capture pipe redirection errors.
Add more debug info.