Update filterFilename function