raise RuntimeError on errors