added wrapper class for logging
implemented validation method
added test for validation
allow deactivating logging