async/sync write hack