implement timeouts on listeners for the dht and add diagnostic stuff