Replaced System.out.println() with a logger.