try logging function.