Change default chunk size to 1000
Fix undefined index while buffering line