Rename setSnapshot to writeSnapshot