Fix: pickle.load might raise AttributeError on invalid files