Add logger in some places.