exit with proper code if sanity fails