Exception logging

Log exceptions instead of swallowing them