 
   defp walk({:., _, [module, function]}, state) do
     if ElixirScript.Translate.Module.is_elixir_module(module) do
-      ModuleState.put_used_module(state.pid, state.module, module)
-
       if ModuleState.get_module(state.pid, module) == nil do
-        do_execute(module, state.pid)
+        case get_debug_info(module, state.pid) do
+          {:ok, _} = result ->
+            ModuleState.put_used_module(state.pid, state.module, module)
+            do_execute(module, result, state.pid)
+
+          result ->
+            do_execute(module, result, state.pid)
+        end
+      else
+        ModuleState.put_used_module(state.pid, state.module, module)
       end
     else
       walk(module, state)

    end)
  end

  defp do_execute(module, pid) do
    result =
      case ModuleState.get_in_memory_module(pid, module) do
        nil ->
          ElixirScript.Beam.debug_info(module)

        beam ->
          ElixirScript.Beam.debug_info(beam)
      end

    case result do
      {:ok, info} ->
        walk_module(module, info, pid)

  defp walk({:%, _, [module, params]}, state) do
    if ElixirScript.Translate.Module.is_elixir_module(module) and
         !ElixirScript.Translate.Module.is_js_module(module, state) do
      if ModuleState.get_module(state.pid, module) == nil do
        case get_debug_info(module, state.pid) do
          {:ok, _} = result ->
            ModuleState.put_used_module(state.pid, state.module, module)
            do_execute(module, result, state.pid)

          result ->
            do_execute(module, result, state.pid)
        end
      else
        ModuleState.put_used_module(state.pid, state.module, module)
      end
    end

