def _setup_output_file(self, output_filename, args):
        """Open and prepare output file."""
        # write command line into outputFile
        # (without environment variables, they are documented by benchexec)
        try:
            output_file = open(output_filename, 'w') # override existing file
        except __HOLE__ as e:
            sys.exit(e)
        output_file.write(' '.join(map(util.escape_string_shell, self._build_cmdline(args)))
                          + '\n\n\n' + '-' * 80 + '\n\n\n')
        output_file.flush()
        return output_file
dataset/ETHPy150Open sosy-lab/benchexec/benchexec/runexecutor.py/RunExecutor._setup_output_file