The function of a safety valve is
To blow off steam when the pressure of steam inside the boiler exceeds the working pressure
Locomotive boiler is of the following type
Gradually increasing temperature of flue gases at inlet to chimney for given steam outputs is an indication of