If all XTCs are corrupt then their is a bad error raised due to trying to read the first file in an empty list. I added a check in the while corrupted loop that will break when there are no files left. This results in a RuntimeError, which is caught by both _update_traj and _load_new_files and correctly just does not add a trajectory to the project. Before the entire script would crash because this error was not caught correctly. I did change it from ValueError, but I have no idea what would be raising that error. This is at the very least more transparent, but some xtc error may still cause a crash.