Add helper functions debug and running_in_parallel