finalise logbook code