simple debug logging, new regex fixes #5