Cache templates only in prod
Added error templates