Added isClosed() and isConnected()