Fix output dir to be consonant with target dir.