Adding more log information for type errors.