Make file readout py3 compatible