Fix crash when file starts with string