Track errors for debugging.