Should fully fix #1231 (closed).
Some simplifying refactoring was done to the file-monitor callback code.