Add debug function to main.cpp file.