BUGFIX: write query meta info in case of failure
set the spark.kryo.referenceTracking on true by default.