added flag to delay thread creation to prevent out of memory errors