PET example read and write data to binary file