Add trailing newlines to templates