sanity check entire document