find a lot of warning from -Wall and fix it.
change default buffer size to 1M