work with replicaset. close mongo connection after import.