Added force_jpeg parameter to always save as jpeg regardless of the options