get error output working when command returns a non 0 code on the shell