Change the background thread to daemon thread so that a script closes
all other threads closes as well