Add option to wait for the shell command process

This prevents multiple executions of the same tool concurrently for consecutive events, which can mess up the output
2 files changed