docs: def print_data_to_file(data, file_name):
      """Prints data to file.
  
      :param data: the data to print.
      :param file_name: the name of the output file.
  
      :type data: numpy.recarray
      :type file_name: str
  
      """
      try:
          with open(file_name, 'w') as output_file:
              print >>output_file, "\t".join(data.dtype.names)
              for row in data:
                  print >>output_file, "\t".join(map(str, row))
      except IOError:
          msg = "{}: can't write file".format(file_name)
          raise ProgramError(msg)