Use extension of file, not extension of obj