general poking of write_out to make it possible to add further arguments vai kwargs