Update printStackTrace to logger.error