Fix exception log bug