Fix a bug in JSON comment parsing. Make some debug log message conditionally compiled using CPPAPP_DEBUG macro.