change file ext logic when --filetype option