Made sanity checks include line and file numbers.