how to use external snapshots with memory state