shell script check if exit code