private void splitFrames(String hexBuff, String file) throws IOException{
      //need to work on salvaging partial frames due to buffer misalignment 
      //and syncwords in the data
      
      String[] frames;
      
      frames = hexBuff.split(syncWord);
      
      for(int frame_i = 0; frame_i < frames.length; frame_i++){
         
         //make sure we have something to work with
         if(frames[frame_i].length() == 0){continue;}
         
         //add sync word back into the frame
         frames[frame_i] = syncWord + frames[frame_i];
         
         //find any extra or shortage in frame length
         //Multiply by 2 because hex format gives 1 char per nybble
         int diff = frames[frame_i].length() - (frameLength * 2);
         
         //Make sure the frame length is correct
         if(diff == 0){
            processFrame(frames[frame_i], file);
         }else if(diff < 0){ //frame is too short
            //Try to build a full length frame from adjacent pieces
            String tempFrame = frames[frame_i];
            int frame_j = frame_i;
            
            while(
                  ((frame_j + 1) < frames.length) && 
                  (tempFrame.length() < (frameLength *2)) 
               
            ){
               frame_j++;
               tempFrame = tempFrame + syncWord + frames[frame_j];
            }
            
            if(tempFrame.length() == (frameLength * 2)){
               frame_i = frame_j;
               processFrame(tempFrame, file);
            }else{
               System.out.println("Short Frame in file " + file + ".");
            }
         }else if(diff > 0){//frame is too long
            //Long frames wont be saved so move on
            System.out.println("Long Frame in file " + file + ".");
         }
      }
   }