Add logger to main.