       true ->
         case File.dir?(path) do
           true -> :error
-          false -> File.read!(path)
+          false -> path
+                   |> File.read!
                    |> :ec_file.sha1sum
                    |> to_string
         end

  end

  @doc """
  Returns the md5sum of a file. Only works for files. Folders passed will return :error:

  ## Arguments



  @spec ensure(bitstring, bitstring) :: none
  def ensure(path, is_file \\ false) when is_bitstring(path) do
    unless File.exists?(path) do
      cond do
        is_file == false -> File.mkdir_p(path)
        is_file -> File.touch(path)
