public static void main(String[] args) 
			throws UnspecifiedErrorException, IOException, InvalidHeaderException {		
		// Attach the shutdown hook to do any necessary cleanup
		Runtime.getRuntime().addShutdownHook(new Thread() {
			@Override
			public void run() {
				in.close();
			}
		});
		
		// Setup the logger
		ClientLogger.setLevel(Level.FINEST);
		ClientLogger.addLogStream("C:\\logs\\clientlog%g.log", null, new MessageOnlyFormatter());
		
		client = new Client(getUsernameFromConsole());
		client.setSuppressingErrors(args.length > 0 ? Boolean.parseBoolean(args[0]) : true);
		
		while (true) {
			switch (getMainMenuSelection()) {
			case CONNECT:
				connectOption();
				break;
			case DISCONNECT:
				disconnectOption();
				break;
			case EXIT:
				exitOption();
				break;
			case MESSAGES:
				MessagesOptionShell.RunMessagesOption(client, in);
				break;
			case QUEUES:
				QueuesOptionShell.RunQueuesOption(client, in);
				break;				
			}
		}
	}