adding locking so multiple jobs don't run at once