tempfile: rename 'template' variables