Added basic sockets with error handling