Enhance debugging output and fix escaped dashes.