filename is now the path to the template