I don't have your datafiles to replay the problem but the code shows me two potential causes (operating system dependent):
call always reserves the right to have read less than the number of bytes you requested it to. Therefore check the returned 'actual bytes read' and see if you need to make another call to read the remaining bytes of the record.