CA-121503 - Make use of rc and stderr in the case of an error

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>