use properly tagged output names; use a separate directory for intermediate files