Implement Closeable
Restore previous APIs for compatibility