bugfix: filenames for templates are now recorded correctly