Replaced some print statements with logging statements.