Throw exception if template path is not given

Part of https://issues.apache.org/jira/browse/WW-3655