Added back accidently deleted store_snapshot function.