added feature to panic on errors (on by default)