Remove --pedantic warning
Fixing verbose output.
Adding check for index overflow.