added exception in logging