flush() after sending data