Evaluation function and logging