Added debug hook

Added a debug hook for additional debug info