Can you post the file you want to read. It would really help if we could see it.

Are you are Opening the files for Random or Binary?

Are Data and Data2 always the same size or dynamic? If dynamic how does the file indicate the size?