Use logger class instead of puts