file cleanup
delete pid file on clean
close socket on connection error