Found a bug in the way the filterbank files that correspond to the target dat file were being gathered using glob. It was just grabbing all fil or h5 files in the subdirectory, but this doesn't account for those cases where all your fils are in one folder (which they shouldn't usually be, but anyway...) so now it joins the fildir with the subdirectory tree and the first part of the dat file name containing the MJD and then * fil or h5 to collect the fils or h5s corresponding to the right MJD. Hopefully that covers enough edge cases.
Found a bug in the way the filterbank files that correspond to the target dat file were being gathered using glob. It was just grabbing all fil or h5 files in the subdirectory, but this doesn't account for those cases where all your fils are in one folder (which they shouldn't usually be, but anyway...) so now it joins the fildir with the subdirectory tree and the first part of the dat file name containing the MJD and then * fil or h5 to collect the fils or h5s corresponding to the right MJD. Hopefully that covers enough edge cases.