rename write->write_checked to not conflict on host
remove more global state