Added log_dir variable.