Added execution mode parameter.