Increase buffer size
Add missing flush