fixing fasta read/write error checks, formatting