Cache error pathes, because file.exists() is slow.