Adding handling for index directory not existing