Add device id checking