reworked run_case and wait_case to use new file data structures