fix two bugs: use 0 as a node index and some nodes are in edges.txt but not in nodes.txt