sending data fail with bluetooth

I want to send a file from android to arduino.
I use mega2560,HC06 and music shield.
how can I confirm the data is correct?
which method can check?
I have transfered .aac file failed.

Android

public void writeByte(byte[] data) {

			try {
				mmOutStream.write(data);
				try {
					Thread.sleep(20);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			} catch (IOException e) { }
		}

Arduino

char buffer[1];
      int incomingByte=0;
      if(Serial.available()>0 )
      {
          myFile = SD.open("C3.aac", FILE_WRITE);
      }   
        
      while( Serial.available()>0 )
      {
          incomingByte=Serial.read(); 
          myFile.write(incomingByte);  
          //Serial.println(myFile.size());   
      }
      if(myFile.size()!=0)
        Serial.println(myFile.size());
      myFile.close();