@yarikoptic Good idea. Looking at the python docs, it appears that the `communicate`  blocks, but calling `poll` can have the issue with the processes blocking due to IO buffer being full if _stdout_ and/or _stderr_ is being captured, forcing use of `communicate`.
Therefore, how about only capturing _stdout_ and _stderr_ if debug logging is enabled and then only calling `communicate` if `retcode` is non-zero?