Check correct variable for exit status