Update filterFilename function

Review please