Updated the mechanism for checking flags to compensate for echo otherwise eating my arguments.