changed plot output from tiff to jpeg