Bash Script Check If Command Failed