add support for loading templates from files