Handling UnicodeDecodeErrors that may be raised while processing logs.