Improve error reporting in CloseFile test.