Fixed old style raise. Added config file and JPEG support