Added switch state based port flow decision as flow could not be added if switch is not discovered