Description of the problem:
I tried to insert a break after every 100 trials by adding a routine. The following lines were added.
if not trialsLoop.thisTrialN in [100, 200, 300, 400, 500]:
continueRoutine = False