Some debug stuff for discoverLinks