Fix no-update issue of current_file_structure (by Linus).

 * Make wdg_current_file_structure static and global to fix update issue.
 * Add some debug output to current_file_structure.