# File ../../auditor/lib/kasp_auditor/preparser.rb, line 65
    def normalise_zone_and_add_prepended_names(infile, outfile)
      # Need to replace any existing files
      infile = (infile.to_s+"").untaint
      outfile = (outfile.to_s+"").untaint
      if  File.exist?(outfile)
        File.delete(outfile)
      end
      @line_num = 0
      begin
        File.open(outfile, File::CREAT|File::RDWR) { |f|
          begin
            IO.foreach(infile) { |line|
              ret = process_line(line)
              next if !ret


              if (ret)
                new_line, type, last_name = ret
                # Append the domain name and the RR Type here - e.g. "$NS"
                line_to_write = prepare(last_name) + NAME_SEPARATOR + type.to_s + SORT_SEPARATOR + new_line
                f.write(line_to_write)
              end
            }
          rescue Exception => e
            KASPAuditor.exit("ERROR - Can't open zone file : #{infile.inspect} : #{e}", 1, @log)
          end
        }
      rescue Exception => e
        KASPAuditor.exit("ERROR - Can't open temporary output file : #{outfile.inspect} : #{e}", 1, @log)
      end
    end