added helper methods for using template to inject into file