Display error in case of the index is out of bound
Move log.