improving code quality, replacing print commands with logging calls
replacing print commands with logging calls