Make autodiscovery thread a deamon. Remove useless use of json.dumps