fix of the sample for reading file (cast missing)