If anyone is struggling, I found another thread which helped. Move the break routine within the loop, and create a code component, in the begin routine, input the code:
if name of loop.thisN == 0 or name of loop.thisN % 10 != 0:
continueRoutine = False
The link to the thread is below: