Added a state to check for info only

the error message and state message were not getting set appropriately
when info only was checked, so I added a state to check for that in the
beginning.