how about using 2 loops depending on operating output,

if progon=1 then do turnoff checking ' "otherwise"
do turn on checking
'''
'''
'''
turnoff checking stuff
''''
turnon checking stuff

don