finalize mongodb config