Updated logging
Updated code
Code