Add debug function.