Basic detection w/ debug code