File monitor device

I would like to use the File Monitoring Device in ‘local settings’ to tell me when an external text file has been written to and use that event to trigger a message box in SambaPOS. I will show my setup in a moment, but the purpose of the question is that the setup seems to work when the file is written to, but is also being triggered randomly at other times (when the text file has not been changed) meaning a message is popping up when it is not required. I need to be able to stop the random events.

The file monitor device is set up as follows

A rule then triggers a message box action

I have tried the file monitor with ‘changed’ and ‘created’ and it make no difference. I have also tried ‘event threshold’ set to 0, 1 and 2 and that seems to have no effect. I have not been able to find much info about the File Monitor Device so if somebody can confirm my setup is correct or otherwise or suggest why we are getting random triggering I would be grateful