add outputdir for fig