FIX error-cascade in diag.php; ADD ability to choose your own serializer in kv