Not sure why the -i condition is failing. Please help me figure this out.