fixes crash when file could not be found