Closed mongodb connection when the import ends