Make sure index dirs are created.