better error checks before calling .setup()