   @doc """
   Start the Mnesia database.
   """
-  def start, do: Mnesia.start
-
+  def start do
+    check_mnesia_dir()
+    Mnesia.start()
+  end
   @doc """
   Stop the Mnesia database.
   """
-  def stop, do: Mnesia.stop
+  def stop do
+    check_mnesia_dir()
+    Mnesia.stop
+  end
 
   @doc """
   Creates the storage given by options.

    ]
    |> Confex.process_env()
  end
end

  Temporarily stops Mnesia, deletes schema and then brings it back up again.
  """
  def storage_down(config) do
    check_mnesia_dir()
    config = conf(config)
    stop()
    Mnesia.delete_schema([config[:host]])
