make output directories automatically