Would it be useful to extend `Closeable` instead?