Added checksnapshot function