logging function added
logging function added