Better spot for error catching