Refactoring - added more intelligent threads management in case of the threads failed. Not it is controlled by an option forbidNewThreadsOnFailure