if (System.in.read() == -1) {
logger.warn("Console read terminated without receiving user input");
}
sayGoodbye(builder, logger);
} finally {
httpServer.shutdownNow();
}
System.out.println("Shut down successful. Goodbye!");
} catch (Exception e) {
LoggerFactory.getLogger(StandaloneServer.class).error("The documents4j server terminated with an unexpected error", e);
System.err.println(String.format("Error: %s", e.getMessage()));