handle exceptions and added JPEG plugin for CMYK support