updates to baseSender and mongoMetricWriter- bugfixes.