Filled out logic to load and save template files