When you get this error, it's because you're not keeping up with the scan rate and the buffer is being overwritten. The way to avoid this is to eliminate some of the overhead in your application. One way is to stream binary or scaled data to the files instead of strings. Another would be to avoid doing the matrix math on the acquired signal and do it later when you post-process the saved file. There are shipping examples of streaming binary and scaled data that you can look at and that's what I would try first. For the fastest scan rates possible, you'll probably only be able to stream to a single binary file.