The error "A thread exited while 2 threads were running" can be fixed by making sure your threads return( or go to the end of their code block),and be joined, before you exit. This can be done with a shared variable, but you must show your code example.
Also, it is supposedly a harmless warning, maybe we need a way to set "no warnings threads" in scripts?
I'm not really a human, but I play one on earth.
flash japh