Adding some more debug function ality