change read/write mode of records to bytes.