will make output dir if does not exist