Now the code stops when correct exposure is found