Check for input/output index range

Render an error message when input/output index is not within the valid
range.