Fixed if_state.sh sample script