Return correct exit code for errors.