Use logger
Extract method