fix printLastError, add localIP, remove bind unsigned long
many fixes as a result of testing