Omitting print statements stops program working

Just attach it, if it too big to post