Use default or default with extension depending on whether or not extension is present