better exception logging
Merge pull request #2174 from dimagi/cz

better exception logging