Add sanity checks