Add print dom function to main.c