Transaction subroutines

Use transactions to bracket multiple I/Os into a single transaction that can pass or fail.