improved file name filtering