v2.2- Added logging support