add flavor selection parameter, and update template file names