Move sanity_checks to base for reusability