Added a way to enable debug.

need to add a way to disable it.