Check for failures to avoid crashes