Error checking for bash errors