When one of the programs (eg. file-generate) fails during the test this code is not executed. In such case we loose the information in all the valgring logs. I think that the logs should be checked not in this code, but eg. in the script which runs the test case (the `run-test.sh` file).