       {:ok, header_lines, rest_data} ->
         key_strings = options |> Keyword.keys() |> Enum.map(&Atom.to_string/1)
 
+        req_strings = Enum.map(required, &to_string/1)
+
         kv_list =
           header_lines
           |> Enum.map(&split_kv/1)
           |> Enum.filter(fn {k, _} -> k in key_strings end)
 
-        with [] <- find_missing(kv_list, required),
+        with [] <- find_missing(kv_list, req_strings),
              {:ok, new_kv} <- transform_values(kv_list, options, []) do
           {:ok, {Map.new(new_kv), rest_data}}
         else

      value -> transform_values(rest, options, [{atom_k, value} | acc])
    end
  end
end

      error ->
        handle_error(error)
    end
  end

  @spec extract_header(binary, [binary], boolean) :: extract_ok | extract_err
