added code to not clear log when device is disconnected.