now writing output files to workdir