fixed saving generated reads to file, tests improved