Omitting print statements stops program working

The sketch is huge and does not fit in what is allowed (9500 chars) I have put the part that deals with the RC here

Attach the complete sketch, this one doesn't have setup and loop routines, so the flow is not clear.

If possible shorten the sketch to a minimal version that shows the same behavior but in your case this seems to be pretty complicated.