error handling in parse_image_name()