ensured debug functions in debug block