Check basename in discovery