   	full_path = Application.get_env(:animu, :file_root) <> path
     if !(File.dir?(path)), do: File.mkdir_p!(full_path)
    	File.write!(full_path <> filename, body)
-		path <> filename
+		filename
 	end
 
 end

      kitsu_rating: kitsu_series["averageRating"],
      kitsu_id: kitsu_series["id"],

      started_airing_date: Date.from_iso8601!(kitsu_series["startDate"]),
      finished_airing_date: Date.from_iso8601!(kitsu_series["endDate"]),
    }
  end

  def get_images(series = %Series{directory: nil}), do: series
  def get_images(series) do
		path = series.directory <> @cover_path
		cover_image = get_map_images(series.cover_image, path)

    path = series.directory <> @poster_path
		poster_image = get_map_images(series.poster_image, path)

		path = series.directory <> @gallery_path
		gallery = get_map_images(series.gallery, path)

    changes = %{gallery: gallery, cover_image: cover_image, poster_image: poster_image}
		Map.merge(series, changes)
  end

  defp get_map_images(nil, _), do: nil
  defp get_map_images(map, path) do
    Map.new(map, fn {k, v} ->
      filename =  "/" <> k <> ".jpg"
		 	v = get_image(v, path, filename)
		 	{k, v}
    end)
  end

  end

  defp format_to_series(kitsu_series) do
    series =
    %Series{
      canon_title: kitsu_series["canonicalTitle"],
      titles: kitsu_series["titles"],
