Added the functionality to initialize a graph from a file