Log, nearly done, prolly rework on dat, TODO: recovery protocol algorithm