Added check error for image_dir