change BUF_SIZE to 8192