handle the error returned by open_logfile, if there is one, closes #24