changed copy_file to template method in resource model generator