Support empty output templates

Change-Id: Ic1f68d89eddd2c465a9175d3e245446e1f0b71f4