Repair datastore on startup