Add some sanity checks to partitioning and formating.