Added a logging feature for making graphs