Code to check duplicated nodes in the file before add records