A method for controlling a safety system for evacuation of contaminated air and prevention of ignition in an air handling system, wherein the air handling system comprises a compressor for compressing a refrigerant for further being led through an evaporator/condenser coil arranged in the air handling system, a supply air unit arranged in a supply air duct, and an exhaust air unit arranged in an exhaust air duct, wherein the safety system comprises a supply air contamination sensor arranged in the supply air duct, an exhaust air contamination sensor arranged in the exhaust air duct, wherein the supply air contamination sensor and the exhaust air contamination sensor collect air contamination data, wherein the air handling system further comprises a control unit for comparison of collected air contamination data to a predefined air contamination data threshold value, and for controlling the supply air unit, and the exhaust air unit, and wherein the air handling system further comprises a power supply for providing power to the supply air unit, the exhaust air unit and the control unit, wherein the method comprises the steps of: A. continuously retrieving air contamination data by means of the air contamination sensors (7,8), B. comparing the retrieved air contamination data to the predefined air contamination data threshold value by means of the control unit, when a value of a first contaminant in the retrieved air contamination data is higher than the predefined air contamination data threshold value, the control unit sends instructions to: C. start the supply air unit and the exhaust air unit, when said units (3, 5) are not operating, D. stop the compressor, when said compressor is operating, E. increase the speed of the supply air unit and the exhaust air unit to a predefined maximum speed, when said units (3, 5) are operating at a current speed lower than a predefined speed, and when a value of the first contaminant in the retrieved air contamination data is lower than the predefined air contamination data threshold value, the control unit sends instructions to: F. stop the supply air unit and the exhaust air unit after a predefined time; wherein the safety system further comprises a supply air valve, variable between a closed and an open position, arranged in a supply air outlet end of the supply air duct for the supply of supply air (As) to a room, an extract air valve, variable between a closed and an open position, arranged in an extract air inlet end of the exhaust air duct for the extraction of used extract air from the room into the exhaust air duct, and a by-pass valve, variable between a closed and an open position, arranged to connect the supply air duct and the exhaust air duct for the fluid connection of supply air (As) in the event that the supply air valve and the extract air valve are closed, wherein the supply air valve, the extract air valve and the by pass valve are controlled by the control unit, wherein the method further comprises, before step D, the step of: opening the by-pass valve, closing the supply air valve, and closing the extract air valve. A. continuously retrieving air contamination data by means of the air contamination sensors (7,8), B. comparing the retrieved air contamination data to the predefined air contamination data threshold value by means of the control unit, when a value of a first contaminant in the retrieved air contamination data is higher than the predefined air contamination data threshold value, the control unit sends instructions to: C. start the supply air unit and the exhaust air unit, when said units (3, 5) are not operating, D. stop the compressor, when said compressor is operating, E. increase the speed of the supply air unit and the exhaust air unit to a predefined maximum speed, when said units (3, 5) are operating at a current speed lower than a predefined speed, and when a value of the first contaminant in the retrieved air contamination data is lower than the predefined air contamination data threshold value, the control unit sends instructions to: F. stop the supply air unit and the exhaust air unit after a predefined time;