Adding debug and utf8 logging management.
Some issues are still there concerning UTF8 encoding...