in reply to comparing 2 file time date stamps
In several replies you say "stamp of the file not in the staging directory". What do you mean by that?
Maybe you should write a little test app that shows the problem you have? Create two files. Wait a few seconds. Rewrite one of them, then perform your modify test. That way we can see and run the failing code and find a solution."