Bug fixing for generating FASTA files without consuming all the memory