changing to only logging to file if LOGFILE specified