add option of output directory