logging.error('ERROR Could not download file.\n'+str(e))
sys.exit(1)
#it possible that the file is avalible to download but has not been writen to the disk of the s3 then the downloaded file has the size of 0
if (os.path.getsize(file_name)!=0):
break
self.waiting_points('Waiting for file: '+str(self.session.head_object(Bucket=bucket,Key=file_name)['ContentLength'])+str(os.path.getsize(file_path),file_path))