Now actually write mean_date and mean_date_weighted to file