renamed $template_file_path to $template_file