Use pyhton logging instead of print