replace prints with logger calls