ISafeKVStorage and better implementation