Write to inmem buffer to avoid blocking on IO