Convert some print to printMSG so that we log things in case the program is running headless.