Replaced custom express renderer with a middleware that overwrites res.render()