output the pid of the process when running the deployment asynchronously
+ factorised command running inside a method