Added functionality to log the number of assignments