Added some error printing when matches fail.