I assume that if something goes wrong it will throw some exception and therefore will be clear that something went wrong. So delete the partial collection and start again. Only takes 5mins or so to run. Perhaps better to remove the option of importing the CSV and let MongoDB handle to import of the JSON directly.