Added a running flag, so that sampled datasets don't have concurrent instances