fix bug that prints groupCollapsed when should print log