Added a try catch for "getTemplateFile" call

Added an try catch. Some blocks have more logic in the getTemplateFile and cause a fatal error.