fixed exception logging
pep 8
pep8