replaced e.printStacktrace()and System.out.println with logger