template file should be at the same folder as the script