added debugging in device synchronization method