updated to use logging

STD logging module.