in reply to checking a file for changes

As a newcomer (in nodes, if not time since you registered), you may want to read On asking for help and How do I post a question effectively?.

Your post would benefit from actual code as opposed to mere speculation that checksum could satisfy a part of your requirement.

And using search or Super Search or even Google (against this site alone), would lead you to several threads begun with much the same objective.