reduced logging by removing log message from inside loop