replaced printStackTrace() with logger calls