printouts + config

added config for input encoding
added debug printouts