Fix bug in tempfile template