Python logging

Use native python logging instead of if debug: print