fix(log): truncate file and reset offset correctly

If we need to truncate the file because of a decoding error
then seek back to the last known good entry.