Add function to insert debugging.
Add discover