fixed it in different way by matching against only the filename rather than filename with path