Open and write to the error log only once for all the files analyzed