support --check/debug