possible problem with catching socket error