Updating closing the device
Adding the copying graph to a png and closing device