Checks no error is returned by deferred Close().