Added read graph from txt file function.