fix encoding issue when only a file is passed as input on command line (string / unicode comparison)
fix encoding issue when only one file is passed on CLI (unicode / str comparison)
various logging encoding issues