This is only checked at the start -- should it be done in the execution loop instead? This process could run a while.