fixed exit codes in command checking