Fixed a bug in the getEdgeNetwork code that had the wrong column indexes when getting the max node id. Added some error checking to the pii function.