Use log_path config parameter instead of logfile. Added more logging.