update image check logic