@justinmk `expand_env()` may trigger a call to `do_log()` and `do_log()` calls `open_log_file()`.