exit if cannot create thread