Added logging to python