JavaIO flushing error fix and ensuring regression test diffs are added as email attachments.