Add filename to an error message in CopyTemplate