You're not providing enough information to make a good judgment on this but my guess is that
a) You didn't delete the temporary file you used to create the template. That temp file contains code that doesn't compile. If that's the case, simply delete the file.
b) You didn't create the template correctly. Then, when you create a new file, you end up with broken code.
Check the TIO exercise that guided you through creating the template and see if you followed all steps correctly.