Improved template rror messages