Make avalon_wait_write a bool function and check its return value.