close thread on stop deamon