Make an effort to catch errors with the logfile