bad seal on the flue its spilling gasses back into the air intake of the flue which cannot be burnt causing flame to extinguish, you removing the cover is allowing fresh air into the boiler to be burnt hence it running and you probably allowing carbon monoxide to enter the room