     ]
     |> Confex.process_env()
   end
+
+  @doc """
+  Checks that the Application environment for `mnesia_dir` is of
+  a correct type.
+  """
+  def check_mnesia_dir() do
+    dir = Application.get_env(:mnesia, :dir, nil)
+    case dir do
+      nil -> Logger.error "Mnesia dir is not set. Mnesia will not work."
+      d when is_binary(d) ->
+        Logger.error "Mnesia dir is a binary. Mnesia requires a charlist, which is set with simple quotes ('')"
+      d when is_list(d) -> :ok
+      d -> Logger.error "Mnesia dir is not character list. Mnesia will not work. "
+    end
+  end
 end

  @doc """
  Start the Mnesia database.
  """
  def start, do: Mnesia.start

  @doc """
  Stop the Mnesia database.
  """
  def stop, do: Mnesia.stop

  @doc """
  Creates the storage given by options.

      storage_up(host: `Kernel.node`, storage_type: :disc_copies)
  """
  def storage_up(config) do
    check_mnesia_dir()
    config = conf(config)

    Logger.info "==> Setting Mnesia schema table copy type"
