Merge iostreams - fix rethrowing an exception.