replaced System.out and printStackTrace with logger calls