added more debug log to the device api