implemented error handling during reverting snapshots

Change-Id: Iae894055900b64bb67e3c18843883246db6483fb