increase recv buf size:

a common tcp packet can have up to 1500 bytes, so we should handle this at once
log errors to logfile