Implemented download option and jpg output