Added isClosed() method