Changed System.out to log.