Make log robust against being log file being deleted during a run (could
be improved)