Issue #4 Moving processing of output before waiting for the process to complete