fix scoping error to honor LOSF_LOG_MODE