Capture exception on undefined expected directory.