   defp add_app(dg, as, parent, {name, start_type}) do
     case :digraph.vertex(dg, name) do
       false ->
-        # Haven't seen this app yet, and it is not excluded
-        do_add_app(dg, as, parent, App.new(name, start_type))
-
+        case validate_app(name) do
+          :ok ->
+            # Haven't seen this app yet, and it is not excluded
+            do_add_app(dg, as, parent, App.new(name, start_type))
+          error -> 
+            error
+        end
       _ ->
         # Already visited
         :ok

    Shell.debugf("  |_____\n\n")
    do_print_discovered_apps(apps)
  end
end

            name
        end

      case validate_app(app_name) do
        :ok ->
          :ok

        {:error, reason} ->
