# Buggy code
def ProcessSource(self):
    """Processes the source.

    Args:
      options: the command line arguments (instance of argparse.Namespace).

    Raises:
      SourceScannerError: if the source scanner could not find a supported
                          file system.
      UserAbort: if the user initiated an abort.
    """
    self._front_end.SetEnableProfiling(
        self._enable_profiling,
        profiling_sample_rate=self._profiling_sample_rate,
        profiling_type=self._profiling_type,
    )
    self._front_end.SetStorageFile(self._output)
    self._front_end.SetShowMemoryInformation(show_memory=self._foreman_verbose)

    self._front_end.ScanSource(
        self._source_path,
        partition_number=self._partition_number,
        partition_offset=self._partition_offset,
        enable_vss=self._process_vss,
        vss_stores=self._vss_stores,
    )

    self._output_writer.Write("\n")
    self.PrintOptions()

    # TODO: merge this into the output of PrintOptions.
    self._DebugPrintCollection()

    logging.info("Processing started.")

    if self._status_view_mode == "linear":
        status_update_callback = self._PrintStatusUpdateStream
    elif self._status_view_mode == "window":
        status_update_callback = self._PrintStatusUpdate
    else:
        status_update_callback = None

    self._front_end.ProcessSource(
        filter_file=self._filter_file,
        hasher_names_string=self._hasher_names_string,
        parser_filter_string=self._parser_filter_string,
        single_process_mode=self._single_process_mode,
        status_update_callback=status_update_callback,
        storage_serializer_format=self._storage_serializer_format,
        timezone=self._timezone,
    )

    logging.info("Processing completed.")


# Traceback (UnicodeDecodeError)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/plaso/engine/worker.py", line 169, in _ParseFileEntryWithParser
parser_object.UpdateChainAndParse(self._parser_mediator)
File "/usr/lib/python2.7/dist-packages/plaso/parsers/interface.py", line 72, in UpdateChainAndParse
self.Parse(parser_mediator, **kwargs)
File "/usr/lib/python2.7/dist-packages/plaso/parsers/interface.py", line 256, in Parse
self.ParseFileObject(parser_mediator, file_object, **kwargs)
File "/usr/lib/python2.7/dist-packages/plaso/parsers/text_parser.py", line 160, in ParseFileObject
_ = self.NextToken()
File "/usr/lib/python2.7/dist-packages/plaso/lib/lexer.py", line 191, in NextToken
return Lexer.NextToken(self)
File "/usr/lib/python2.7/dist-packages/plaso/lib/lexer.py", line 99, in NextToken
possible_next_state = callback(string=m.group(0), match=m)
File "/usr/lib/python2.7/dist-packages/plaso/parsers/text_parser.py", line 119, in ParseIncomplete
self.attributes['body'] += match.group(0)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 0: ordinal not in range(128)

# Fixed code
def ProcessSource(self):
    """Processes the source.

    Args:
      options: the command line arguments (instance of argparse.Namespace).

    Raises:
      SourceScannerError: if the source scanner could not find a supported
                          file system.
      UserAbort: if the user initiated an abort.
    """
    self._front_end.SetDebugMode(self._debug_mode)
    self._front_end.SetEnableProfiling(
        self._enable_profiling,
        profiling_sample_rate=self._profiling_sample_rate,
        profiling_type=self._profiling_type,
    )
    self._front_end.SetStorageFile(self._output)
    self._front_end.SetShowMemoryInformation(show_memory=self._foreman_verbose)

    self._front_end.ScanSource(
        self._source_path,
        partition_number=self._partition_number,
        partition_offset=self._partition_offset,
        enable_vss=self._process_vss,
        vss_stores=self._vss_stores,
    )

    self._output_writer.Write("\n")
    self.PrintOptions()

    # TODO: merge this into the output of PrintOptions.
    self._DebugPrintCollection()

    logging.info("Processing started.")

    if self._status_view_mode == "linear":
        status_update_callback = self._PrintStatusUpdateStream
    elif self._status_view_mode == "window":
        status_update_callback = self._PrintStatusUpdate
    else:
        status_update_callback = None

    self._front_end.ProcessSource(
        filter_file=self._filter_file,
        hasher_names_string=self._hasher_names_string,
        parser_filter_string=self._parser_filter_string,
        single_process_mode=self._single_process_mode,
        status_update_callback=status_update_callback,
        storage_serializer_format=self._storage_serializer_format,
        timezone=self._timezone,
    )

    logging.info("Processing completed.")