put quality stats into text file