MongoDB client closed correctly after insert