change puts to logger