fix writing of output from delta