Improved robustness in file reader
p4#: 21358