try { serverlog.close(); } catch (IOException e) { System.err.print("Exception closing logfile: "); e.printStackTrace(); };
if (serverlog != null) { try { serverlog.close(); } catch (IOException e) { System.err.print("Exception closing logfile: "); e.printStackTrace(); }; }
    public void die() {        // If we're still connected, tell the server that we're going down.        if (connected) {            send(new Packet(Packet.COMMAND_CLOSE_CONNECTION));        }        connected = false;        pump = null;        // shut down threads & sockets        try {            socket.close();            in.close();            out.close();        } catch (IOException e) {            e.printStackTrace();        } catch (NullPointerException e) {            // not a big deal, just never connected        }                for (int i = 0; i < closeClientListeners.size(); i++){            ((CloseClientListener)closeClientListeners.elementAt(i)).clientClosed();        }        try {            serverlog.close();        } catch (IOException e) {            System.err.print("Exception closing logfile: ");            e.printStackTrace();        };        System.out.println("client: died");            }