remove redundant switching of the filetype detection.