write output to common directory