allow setting debug mode from java
fixed order of defn