Replaced print and pprint statements with log statements