Use logger

Should still be reworked