Use kill_with_error on I/O failure. Fix missing ifdef on MPI barrier.