sophia: add error injections for snapshotting