def binwrite(path, data)
      File.open(path, 'wb') do |file|
        file.write(data)
      end
    end
def binwrite(path, data)
      File.open(path, 'wb') do |file|
        file.write(data)
      end
    end
TODO: we should just move this to a more standard thing