check exit codes