if instead of exit code handling