refactoring and manually setting encoding to UTF-8
take out the dying log, manually force file encoding UTF-8