Make VersionedState fail-safe

adds logs, and takes the most recent version.