Add diagnostics to serialization tests