Adjust debug logging - improve/pep8ify