<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def RunValidationOutputToFile(feed, options, output_file):
 """Validate feed, write HTML to output_file and return an exit code."""

  accumulator = HTMLCountingProblemAccumulator(options.limit_per_type,
                                               options.error_types_ignore_list)
  problems = transitfeed.ProblemReporter(accumulator)
  schedule, exit_code = RunValidation(feed, options, problems)
  if isinstance(feed, basestring):
    feed_location = feed
  else:
    feed_location = getattr(feed, 'name', repr(feed))
  accumulator.WriteOutput(feed_location, output_file, schedule, options.extension)
  return exit_code