Better error messages for required parameters to check_state and check_close.
Print out better messages when asserting in test_utils.