Added simple debugging support in the C version.