Mark `onlycheck` variable as local and add default value