Use BUFSIZ instead of arbitrary 4096.