check commands exist before using