Using python logging instead of print and rename logging module to resolve name conflict