Add quitting to image checking