set exit status != 0 in error paths