Check inode to detect overwritten files

Example:

t=0 : /x/file1 is copied to /sync/file1

t=1 : Modify /x/file1

t=2 : Scanning /sync/file1

t=3 : copy (overwrite) /x/file1 -> /sync/file2

t=4 : Scanning /sync/file1 => no changes detected because /sync/file1 has been modified when t=1 (before t=4)

Now we compare the inode to detect this kind of changes