Add Debug mode

Added a mode for debugging