Add logging to try to help diagnose flakiness. And while I'm here, simplify & improve file closing logic. Bug: 168216494 Test: atest CtsNetTestCases:android.net.cts.NetworkWatchlistTest Change-Id: I1c875102f0cce32cbbe2e3b36de913741c9abb92