Added a debug mode for wrapper.phjs