public static void main(String[] args) throws IOException, InterruptedException {

		Comparator<TimeStampedMessage> logicalComparator = new Comparator<TimeStampedMessage>() {
			public int compare(TimeStampedMessage o1, TimeStampedMessage o2) {
				int time1 = (Integer) o1.getTimeStamp();
				int time2 = (Integer) o2.getTimeStamp();
				if (time1 < time2) {
					return -1;
				} else if (time1 > time2) {
					return 1;
				} else {
					return 0;
				}
			}
		};

		information = new PriorityQueue<TimeStampedMessage>(100, logicalComparator);

		Scanner in = new Scanner(System.in);
		while (true) {
			System.out.println("Please enter configuration file name");
			System.out.print("LogicalLogger>: ");
			String configFileName = in.next();
			try {
				ConfigFileParser configParser = new ConfigFileParser(configFileName, null);
				int port = configParser.getLoggerPort();
				startListenerThread(new ServerSocket(port));
				System.out.println("Log server is running at port " + port);
				break;
			} catch (Exception e) {
				System.out.println("Could not load config file. " + e);
			}
		}
		System.out.println("Available commands: print, exit");
		System.out.print("LogicalLogger>: ");
		String command;
		while ((command = in.next()) != null) {
			if (command.equals("exit"))
				break;
			else if (command.equals("print"))
				printInformation();
			else
				System.out.println("Available commands: print, exit");
			System.out.print("LogicalLogger>: ");
		}
		in.close();
		System.out.println("LogicalLogger terminated normally");
		System.exit(0);
	}