added debug log message
performance enhancement by using correct data type