Added logging to subprocesses