Read graph from file