- Fixes for cn
- added debug output
- readded chatlog function.