switch template to file