how to read records from a binary file