Modify gazebo_motor_model

Hello PX4 community.

Since I have literally started few days ago, I am new and i am trying to modify the gazebo_motor_model.cpp to print in a .txt the forces and RPMs for each sample time. The problem is that I am also new at C++, and i have been trying this for a few days and I dont now if it is even possible… Does everyone know how can i do this? Thanks and greetings