loading template from file