Writing to stderr cause the thread to die when encountering an exception.