Fix the check if a file extension is used