write top keywords to file