Allowing close() to be called multiple times as per java.io.Closeable