Changed output to JPEG