Shell now implements java.io.Closeable.