Run  upon template completion