Cache errors as well. Also, assign them to correct file.