support output dir option