Monitoring python script organized into more methods