allow undef for log_dir