Generates .txt file with wordcount