Checking if the process terminated unexpectedly