read nodes from file