Modify plot1.r to use download function