added error messages to image type and size