Force UTF8 encoding for environment log file and fixup unit test for sys drain logs