Consistent creation of snapshots