isolate code that checks usage

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>