Make template file declaration dynamic