add outdir and outfile option for cfg.json in Rtool.R