Try to standardize on printMSG / debugMSG usage. Probably refactor at some point and have a single function that takes a $fh argument.