Sanity check functionality added.