replace puts info to logger
update rspec test code