Added logging to simulation.