Python exception logging

Resolves Issue #480