rename variable name target to output_dir