improved exception handling; implemented SaveSnapshot()