moved output to logger