anchor.diff:    io:format("Uncaught event: ~p while in state: ~p ~n", [Event, launching]),
     {next_state, launching, State}.
   
  -pending({updated_bee_status, BackendStatus}, #state{app = App, bee = Bee, from = From} = State) ->
  +pending({updated_bee_status, BackendStatus}, #state{app = App, bee = Bee, from = From, latest_sha = Sha} = State) ->
     ?LOG(info, "Application started ~p: ~p", [BackendStatus, App#app.name]),
     % App started normally
  -  From ! {bee_started_normally, Bee},
  +  From ! {bee_started_normally, Bee, App#app{sha = Sha}},
     {stop, normal, State};
     
   pending(_Event, State) ->
  
positive.code: 
  -record (state, {
    app,
    host,
    port,
    bee,
  
negative.code: %% the current state name StateName is called to handle the event. It is also
  %% called if a timeout occurs.
  %%--------------------------------------------------------------------
  launching({launch, From}, #state{app = App, host = Host, latest_sha = Sha} = State) ->
    Self = self(),
    io:format("Calling ~p, app_handler:start_new_instance~n", [Host]),
    rpc:call(Host, app_handler, start_new_instance, [App, Sha, Self, From]),
    {next_state, launching, State#state{from = From}};
  
  launching({started_bee, Be}, State) ->
  