Some log funcionalities added.
Previous commit corrected. The simulation is working.