flush after write