def read_file(self, filename, destination=''):
        if not destination:
            destination = filename
        log.info('Transferring %s to %s', filename, destination)
        data = self.download_file(filename)
        with open(destination, 'w') as fil:
            fil.write(data)
reading data from device into local file
dataset/ETHPy150Open kmpm/nodemcu-uploader/nodemcu_uploader/uploader.py/Uploader.read_file