Add a debug mode for issue #12