Move sanity check to individual files.