Fix crash when file doesn't exist