Use error flag
Change tab to 4 spaces
Change tab to 4 spaces
Change tab to 4 spaces
Change tab to 4 spaces
Change tab to 4 spaces
Change tab to 4 spaces
Add errorv flag and remove try...catch bloack on index