Why the try/catch? If the write fails, then the test is fubar'ed anway.