added template_overwrite option