Changed to use logger instead of puts