add logging function
add logging function