query mongodb for categorylinks, remove useless files