public static void main(String[] args) {
        // more than 0 args
        if (args.length > 0) {
            try {
                int port = Integer.parseInt(args[0]);
                if (port < 1024) {
                    System.out.println("Invalid port:" + args[0]);
                    new FileServer().launch();
                } else {
                    new FileServer(port).launch();
                }
            } catch (NumberFormatException e) {
                System.out.println("invalid port: " + args[0]);
                new FileServer().launch();
            }
        } else {
            // 0 args
            new FileServer().launch();
        }
    }