first log the exception