Added some debug flags
Modified logs
Modified charset detection
Modified log level to TRACE (temporal)
Merge branch 'bugfix-#15-codec' into bugfix-#15