Make sure saveTemplate checks if template already exists, both client and server-side.