Implemented functions to enable and disable printing for debugging purposes.