There are two ways to interpret your question:
(1) You want
all data saved to file, but the alarm related text should only show whenever it changes (blank otherwise).
(2) You
only want data saved to file whenever the alarm changes.
In both cases, a line should probably get written unconditionally the first time the loop iterates.
I have implemented case (1) with a few small modifications to your VI. If you want case (2) behavior, you should place the case structure where indicated with the green frame.