make test run output processing more robust