prevent emitting NaN on really fresh files, plus improve some error logging