Use base_dir to enhance compatibility.