Adding check for any errors while doing CheckForGaps

Change-Id: Icd0547ce806d8bbbed29841839dd17a742622638