Fix typos and correct grammar errors
Implement periodic flushing