increasing bufsize to 512