Working and unit tested transaction log recovery helper