You should probably break when you find a valid config.