Add some extra diagnostics.