replacing puts with logger output
Rubocop refactoring