public static void main(final String[] args) {
        PrintStream origErr = System.err;
        PrintStream origOut = System.out;
        System.setErr(origOut);

        Runtime.getRuntime().addShutdownHook(new Thread()
        {
            @Override
            public void run()
            {
                System.out.println("Shutdown hook ran!");
            }
        });

        bombersCount = args.length - 1;
        PORT_NO = Integer.parseInt(args[args.length - 1]);
        IBomber[] bombers = new IBomber[bombersCount];
        
        try {
            File mapFile = initMap();
            Match m = createMatch(bombers, mapFile);
            m.parseMap();
            createBombers(bombers, m, args);
            m.run();
            createAndSendInitialMessageToAllBots(m, bombers);

            // LET'S PLAY
//            System.out.println("Shall the game begin");
            do {
                String status = m.getStatus();
                System.out.print(status);
                sendToAllBots(bombers, status);

                Thread.sleep(1000);

            } while (!m.passRound());
            System.out.println(m.getStatus());

            sendToAllBots(bombers, "THE END\n");

        } catch (InterruptedException ex) {
            System.out.println("DBG: interrupted" + ex);
        } catch (IOException ex) {
            System.out.println("DBG: exception" + ex);
        } finally {
            System.out.println("Starting to kill bombers");
            killBombers(bombers);
            System.out.println("DONE");
        }
    }