add error checking for missing logfile