remove the unnecessary step of extracting the file extension from the path.