@staticmethod
def write_file(filename, bstr):
    with open(filename, 'wb') as afile:
        afile.write(bstr)
@staticmethod
def write_file(filename, bstr):
    with open(filename, 'wb') as afile:
        afile.write(bstr)