Added exception handling in index mapper.