Check if thread is running before starting it