replace printStackTrace() to logger