replaced http.ResponseWriter with io.Writer in template manager