Bug/iotcore 232 capture redirection errors

Capture pipe redirection errors.
Add more debug info.
FIXED in f0b563a