The big problem with that VI is that is sits around waiting for an event. It will only respond to a time change when an event occurs and even then it will have read the "current time" at the beginning of the iteration, not when the event occurs. Also latch action booleans need to have their terminals inside the loop, preferably inside the event case, so they are "read" and unlatch.
One way to fix this would be to put your time check and file code inside a Timeout event case. Also, moving the file open and close outside the loop is probably a good idea.
Lynn