saves agent results to text file