Fix error logging issue.