do not use relative path for getFileContents, do not stringify if template is already a string