Raise exception if fail to save image