set the default extension if not given