if(traceWriter != null) try { traceWriter.write("</query-log>"); traceWriter.close(); } catch (IOException e1) { }
	private final void shutdown(boolean force) {		try {			DatabaseInstanceManager mgr =				(DatabaseInstanceManager) current.getService("DatabaseInstanceManager", "1.0");			if (mgr == null) {				System.err.println("service is not available");			} else if (mgr.isLocalInstance() || force) {				System.out.println("shutting down database...");				mgr.shutdown();			}		} catch (XMLDBException e) {			System.err.println("database shutdown failed: ");			e.printStackTrace();		}	}