add logging level to see messages in console. change location of print statement. serialize printed objects.