Binding socket to local port, fixed result output, removed some debug logs