Fixed an error if the template type did not exist
Added the template files