added codegen for unformatted write