OK. I changed to sleep when an exception has occurred during the indexing.