Added checks on all printf statements (which did not already have it) to only print if debugging mode is enabled