recover from directory errors