modified bug about logging