add debugging code w.r.t. start dir and regtest config