CODE: Add debug messages for each modal dialogue for debugging purposes.