Add failure check