Moving assertion out of the for block and adding fail message