wrote results into a separate file