added logger.
made object volatile and another final.