catching empty doc dir exception