private function to allow testing logs