Adds debug functions