Error handling of image import