{%
    if State == 'Exception' or State == 'Killed' or State == 'Cancelled' then
        echo('Restore factory setting failed.')
    end

    if State == 'Completed' then
        echo('Restore factory setting successfully.')
    end
%}