finalisation of mongo logger