Terminal implements AutoCloseable