read fasta and wite results to external file.