Updated plot and added file loading to plot function