replace cout by loginfo