def error_in_upload(rows)
      csv_file_path = "#{@file_path}/errors_#{@csv_file_name}"
      begin
        CSV.open(csv_file_path, "wb") do |csv|
          rows.each do |row|
            csv << row
          end
        end
      rescue Exception => e
        Rails.logger.error e.formatted_exception("Building error file for #{@file_name} failed!")
      end
    end
def error_in_upload(rows)
      csv_file_path = "#{@file_path}/errors_#{@csv_file_name}"
      begin
        CSV.open(csv_file_path, "wb") do |csv|
          rows.each do |row|
            csv << row
          end
        end
      rescue Exception => e
        Rails.logger.error e.formatted_exception("Building error file for #{@file_name} failed!")
      end
    end
Creates error file with error rows, e.g.
 for users.csv file, it creates errors_users.csv