Error checking on image