added ability to use file option for creating/updating a template