Added a simple debug mechanism