log exceptions for debugging