Fixes segfault caused by accessing destroyed logging object when test file is successfully removed.