Checking whether closing succeeds