Fix crash when logfile doesn't exist