Addressed a UnicodeDecodeError issue with logger