Adding some debug tools