make thread into daemon so when process ends, all threads end
minor: clear txt files