Changed System.out.println and System.err.println to log()