[T4] Improve error logging a little