Implementation of Logging class, and little correction in Socket