Make sure errors are caught