Added error cache for improving speed