afterWrites are called immediately if empty buffer