added logging of graph to file on start