Added limit on number of error files to store