Added debug helper function - Closes issue #1