doSnapshot script