bugfix async send
cleanup commented out code
read cmdline
log/print sock errors / close. make print configurable