always catch exceptions from cimg, fix #244