                     tag = String.trim x
                     %{name: tag, list_url: "#{Keyword.get proj, :base_url}tags/#{tag}/"}
                   end)
-      {:ok, {title, tags}}
+      {title, tags}
     rescue
       _ in MatchError ->
-        {:error, :invalid_header}
+        mkinfo_fail srcdir, filename, :invalid_header
     end
   end
 

    exit "error while building blog posts"
  end

  defp extract_date(filename) do
    try do
      [y, m, d, hhmm|_] = filename |> String.split("-") |> Enum.map(fn x ->
        case Integer.parse(x) do

    [l1, l2|lines] = "#{srcdir}#{file}.md" |> File.read! |> String.split("\n")
    stub = lines |> Earmark.to_html
    plen = Keyword.get(proj, :preview_length) || @default_preview_length
    preview = make_preview stub, plen
    {year, month, day, hour, minute} = extract_date srcdir, file
    {title, tags} = extract_title_tags srcdir, file, l1, l2, proj
    datetime = {{year, month, day}, {hour, minute, 0}}
               |> Timex.to_datetime(:local)
               |> Timex.format!(Keyword.get(proj, :date_format) || @default_date_format)
