Changed prints to logging functions.
Changed prints to logging functions.