write histograms+plots to mass_output