use logging rather than raw prints