improving logging, adjusting logic timinig