checkversion runs the given command if the given version matches the version of the command