write ard as binary format